package com.yundong.gongchengji.ui.my.activity;

import android.os.Bundle;
import android.view.View;

import com.yundong.gongchengji.R;
import com.yundong.gongchengji.base.BaseActivity;

import cn.bingoogolapple.badgeview.BGABadgeRadioButton;

import static com.yundong.gongchengji.R.id.btn_tender;
/**
 * 我的任务
 * Created by ls on 2017/2/21.
 */

public class MyTaskActivity extends BaseActivity implements View.OnClickListener{
    private BGABadgeRadioButton btnTender;
    private BGABadgeRadioButton btnSignContract;
    private BGABadgeRadioButton btnDuring;
    private BGABadgeRadioButton btnSuccessfulDeal;
    private BGABadgeRadioButton btnRefund;
    @Override
    public int getContentViewId() {
        return R.layout.activity_my_task;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        setLeft();
        setTitle("我的任务");

        btnTender= (BGABadgeRadioButton) findViewById(btn_tender);
        btnSignContract= (BGABadgeRadioButton) findViewById(R.id.btn_sign_contract);
        btnDuring= (BGABadgeRadioButton) findViewById(R.id.btn_during);
        btnSuccessfulDeal= (BGABadgeRadioButton) findViewById(R.id.btn_successful_deal);
        btnRefund= (BGABadgeRadioButton) findViewById(R.id.btn_refund);
    }

    @Override
    protected void initVariable() {
        btnTender.setOnClickListener(this);
        btnSignContract.setOnClickListener(this);
        btnDuring.setOnClickListener(this);
        btnSuccessfulDeal.setOnClickListener(this);
        btnRefund.setOnClickListener(this);

        btnTender.showTextBadge("1");
        btnSignContract.showTextBadge("2");
        btnDuring.showTextBadge("3");
        btnSuccessfulDeal.showTextBadge("4");
        btnRefund.showTextBadge("5");
    }

    @Override
    protected void processLogic(Bundle savedInstanceState) {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_tender:
                btnTender.hiddenBadge();
                break;
            case R.id.btn_sign_contract:
                btnSignContract.hiddenBadge();
                break;
            case R.id.btn_during:
                btnDuring.hiddenBadge();
                break;
            case R.id.btn_successful_deal:
                btnSuccessfulDeal.hiddenBadge();
                break;
            case R.id.btn_refund:
                btnRefund.hiddenBadge();
                break;
        }
    }
}
